import { Module } from "@nestjs/common";
import { serverConfig } from "../common/config";
import { JwtModule } from "@nestjs/jwt";
import { AuthService } from "./auth.service";
@Module({
  imports: [
    JwtModule.register({
      global: true, // 设置为全局可用
      secret: serverConfig.JWT_SECRET,
      signOptions: {
        expiresIn: serverConfig.JWT_EXPIRES,
      },
    }),
  ],
  controllers: [],
  providers: [AuthService],
  exports: [AuthService],
})
export class AuthModule {}
